package io.xccit.train.common.exception;

import io.xccit.train.common.enums.BusinessCode;

/**
 * @author CH_ywx
 * @version 1.0
 * @create 2024/11/6
 * <p>会员业务异常</p>
 */
public class BusinessException extends RuntimeException {

    private BusinessCode businessCode;

    public BusinessException(BusinessCode businessCode) {
        this.businessCode = businessCode;
    }

    public BusinessCode getBusinessCode() {
        return businessCode;
    }

    /**
     * 屏蔽堆桟信息 提高性能
     * @return 当前对象
     */
    @Override
    public synchronized Throwable fillInStackTrace() {
        return this;
    }
}
